<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../../../css/style.css" />
		<link rel="stylesheet" href="../../../javascript/plug-ins/layui/css/layui.css" media="all" />	
		<script src="../../../javascript/jquery.js"></script>

		<script type="text/javascript" src="../../../javascript/plug-ins/pagination.js" ></script>
		<script type="text/javascript" src="../../../javascript/plug-ins/layui/layui.js"></script>	
		
		<!--	分页	-->
		<link rel="stylesheet" href="../../../css/pager.css"/>
		<script src="../../../javascript/pager.js"></script>  
		<script src="../../../javascript/jquery.table2excel.js"></script>  
		<script src="js/experience_card.js?v=1"></script>  
	</head>
	<body>
		
	   <div class="page-wrap">		
		
		<section class="page-hd t">         
         <header>
			<h5 class="title">
				<a href="card_list.html" >优惠券</a>
				<a href="experience_card.html" class="red">体验卡</a>
				<a href="vip_card.html">VIP卡</a>
			</h5>	
		 </header>
		 <hr>
		</section>
		
			
		<div class="panel panel-default" style="text-align: center;">
		  
		  <div class="flex flex-wrap flex-col-5 form-group">
              <div class="box-child text-left">
			  <input onclick="window.location.href='add_carmel.html'" class="btn btn-info" type="button" value="生成卡密"/>
			  <a><input class="btn btn-info margin_left20" onclick="onclick_exeropt();" id="exeropt" type="button" value="导出"/></a>
			  </div>
		  	  <div class="box-child text-left">使用状态：
			  	  <select style="width:auto;" id="user_type" onchange="searchinfo();">
				  	  <option value="0">请选择</option>
				  	  <option value="1">已使用</option>
				  	  <option value="2">未使用</option>
			  	  </select>
		  	  </div>
		  	  <div class="box-child text-left">导出状态：
			  	  <select style="width:auto;" id="forcard_type" onchange="searchinfo();">
				  	  <option value="0">请选择</option>
				  	  <option value="1">已导出</option>
				  	  <option value="2">未导出</option>
			  	  </select>
		  	  </div>
		  	  <div class="box-child width30 text-left">卡号/卡密：
				  <input class="form-control width50" id="card_camis" placeholder="请输入卡号或卡密" /> 
				  <input class="btn btn-info" onclick="searchinfo();" type="button" value="搜索" />
			  </div>
			   <input class="btn btn-info margin_left20" type="button" onclick="delete_exeropt(2);" id="exeropt" value="清除数据"/></div>
		  </div>
		  
		  
		  
		  <table class="table table-bordered" id="table2excel">
		  	<thead>
		  		<tr>
		  			<th>ID</th>
		  			<th>卡号</th>
		  			<th>卡密</th>
		  			<th>金额</th>
		  			<th>生成时间</th>
		  			<th>导出状态</th>
		  			<th>使用状态</th>
		  			<th>到期时间</th>
		  			<th>操作</th>
		  		</tr>
		  	</thead>
		  	<tbody>
		  		<!--<tr>
		  			<td>1</td>
		  			<td>454546</td>
		  			<td>455665656664586</td>
		  			<td>500.00</td>
		  			<td>2017-11-10</td>
		  			<td>已导出</td>
		  			<td>已使用</td>
		  			<td>2017-11-14 12:00:00</td>
		  			<td><a href="#">删除</a></td>
		  		</tr>
		  		
		  		<tr>
		  			<td>1</td>
		  			<td>454546</td>
		  			<td>455665656664586</td>
		  			<td>500.00</td>
		  			<td>2017-11-10</td>
		  			<td>已导出</td>
		  			<td>已使用</td>
		  			<td>2017-11-14 12:00:00</td>
		  			<td><a href="#">删除</a></td>
		  		</tr>-->
		  		
		  	</tbody>
		  	
  	
		  </table>
			
			<!--<div>
				<ul class="pagination" id="page2">
				</ul>
				<div class="pageJump">
					<span>跳转到</span>
					<input type="text" style="width:60px;"/>
					<span>页</span>
					<button type="button" class="button">确定</button>
				</div>
			</div>-->
			<div id="page"></div>

			
			
		</div>
		
		
			
	   </div><!---page-wrap------>		
		
		
	</body>
	<script>
	
	/* $("#exeropt").click(function(){
		var is_use=$("#user_type option:selected").val();
		var is_export=$("#forcard_type option:selected").val();
		var card_cami=$("#card_camis").val(); 
		window.location.href="../../../export/exp/refunds.jsp?loginname="+loginname+"&loginkey="+loginkey+"&is_use="+is_use+"&is_export="+is_export+"&card_cami"+card_cami;
		var t=new Date();
		var time=t.getFullYear()+""+t.getMonth()+1+""+t.getDate()+"";
		top.layer.confirm('确定导出体验卡？',{icon: 3,title:'提示信息'},function(index){	
			//var index = top.layer.msg('导出中，请稍候',{icon: 16,time:false,shade:0.8});
			export_id=export_id.substring(0,export_id.length-1);
			setTimeout(function(){
				$.ajax({
					url: "../../../../service",
					cache: false,
					async: false,
					data: {
						proc: "xmy_zyr.update_card_export",
						para: "['" + loginname + "','" + loginkey + "','"+export_id+"','"+1+"']"
					},
					dataType: "json",
					success: function(data) {
						if(data[0].TAG=='1'){
							$(".table").table2excel({
								exclude: ".noExl",
								name: "Excel Document Name",
								filename : "体验卡" + time+ ".xls", //文件名称    
								name: "Excel Document Name.xlsx",    
								exclude_img: true,
								exclude_links: true,
								exclude_inputs: true
							});
							layer.closeAll();
							layer.close(index);
						}else if(data[0].TAG=='0'){
							layer.closeAll();
							top.layer.alert(""+data[0].MSG+"",function(index){
							   top.location.href="login.html";
							   layer.close(index);
							});		
							return  false;
						}else{
							layer.closeAll();	
							alert("请检查网络设置！");
							layer.close(index);
							return false;
						}
					}
				});
			},1000);	
		});
     });*/
	</script>
	<script>
		
	Page({
		num:10,					//页码数
		startnum:1,				//指定页码
		elem:$('#page2'),		//指定的元素
		callback:function(n){	//回调函数
			console.log(n);
		//	a();
		}
	});
    
    
	</script>
	
</html>
